package com.hyzx.qbasic.admin.model.vo.req.admin;

import com.hyzx.qbasic.admin.model.vo.req.BaseRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * Created by 黄江华 on 2017/10/17
 */

@ApiModel
public class AddOrgReq extends BaseRequest {

    @ApiModelProperty("机构名称")
    @NotEmpty(message = "机构名不能为空")
    @Length(max = 100, message = "机构名不能超过100个字符")
    private String orgName;

    @ApiModelProperty("机构编码")
    @NotEmpty(message = "机构编码不能为空")
    @Length(max = 100, message = "机构编码不能超过100个字符")
    private String orgCode;

    @ApiModelProperty("父机构ID")
    @NotEmpty(message = "父机构ID不能为空")
    private List<Integer> parentIdList;

    @ApiModelProperty("机构排序")
    @NotNull(message = "机构排序不能为空")
    @Range(min = 0, message = "机构排序不能小于0")
    private Integer priority;

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    public List<Integer> getParentIdList() {
        return parentIdList;
    }

    public void setParentIdList(List<Integer> parentIdList) {
        this.parentIdList = parentIdList;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }
}
